package demo1;

public class Dog extends Animal{
    public String color;
    public Dog(String name,int age,String color){
        super("旺财",10);//实例化父类
        this.color = color;
        Age();
    }

    public void Age(){
        System.out.println(this.name+"今年"+age+"岁了,是一只"+this.color+"色的小狗");
    }

    @Override
    public void eat(){
        System.out.println(this.name+"正在吃饭");
    }
}
